package common

import (
	"github.com/cespare/xxhash/v2"
	"github.com/zentures/cityhash"
)

type Hash interface {
	Sum64(key []byte) uint64
}

type XXHash struct {
}

func (X *XXHash) Sum64(key []byte) uint64 {
	return xxhash.Sum64(key)
}

type CityHash struct {
}

func (c *CityHash) Sum64(key []byte) uint64 {
	return cityhash.CityHash64(key, uint32(len(key)))
}
